<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        a{
            width: 100px;
            height: 40px;
            display: block;
            text-align: center;
            line-height: 40px;

            text-decoration: none;
            color: #000;
            /* border: 1px solid red; */
            position: relative;
            /* border: 2px solid red; */
        }

        /* 绘制那根线 */
        a::after{
            content: "";
            /* display: block; */
            position: absolute;
            /* border: 3px solid red; */
            height: 2px;
            background-color: skyblue;
            left: 50%;
            right: 50%;
            bottom: 6px;
            transition: left .5s, right .5s;
        }
        a:hover::after{
            left: 0;
            right: 0;
        }


    </style>
</head>
<body>
    <a href="">点击进入</a>
</body>
</html>